-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error message for duplicate waypoint #30548
Conversation
@dukenv0307, please check this #29803 (comment), I think we want to change the error message content. |
@ntdiary I updated the code and the test step. |
|
||
if (_.size(validatedWaypoints) < 2) { | ||
const isDuplicatedWaypoints = numberOfNoneEmptyWaypoints > _.size(validatedWaypoints) && _.size(validatedWaypoints) === 1; | ||
if (_.size(validatedWaypoints) < 2 || isDuplicatedWaypoints) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that we don't need isDuplicatedWaypoints
and numberOfNoneEmptyWaypoints
. Also, we can delete iou.error.duplicateWaypointsErrorMessage
and its translation
|
||
if (_.size(validatedWaypoints) < 2) { | ||
const isDuplicatedWaypoints = numberOfNoneEmptyWaypoints > _.size(validatedWaypoints) && _.size(validatedWaypoints) === 1; | ||
if (_.size(validatedWaypoints) < 2 || isDuplicatedWaypoints) { | ||
return {0: translate('iou.error.emptyWaypointsErrorMessage')}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can replace iou.error.emptyWaypointsErrorMessage
with iou.error.atLeastTwoDifferentWaypoints
, its content: Please enter at least two different waypoints
@ntdiary I updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to confirm translation
Co-authored-by: wentao <[email protected]>
Co-authored-by: wentao <[email protected]>
Co-authored-by: wentao <[email protected]>
Updated. |
Reviewer Checklist
Screenshots/VideosAndroid: Native30548-mobile-android.mp4Android: mWeb Chrome30548-mobile-chrome.mp4iOS: Native30548-mobile-ios.mp4iOS: mWeb Safari30548-mobile-safari.mp4MacOS: Chrome / Safari30548-web.mp4MacOS: Desktop30548-desktop.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @tgolen, We still need to confirm the Spanish translation. : )
en: Please enter at least two different waypoints.
es: Por favor introduce al menos dos puntos de ruta diferentes.
I'll wait to merge until I hear word that the translations are approved. |
I just noticed the label was added. |
@tgolen The translation is confirmed. I think we can merge now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the latest code doesn't use confirmed translations
src/languages/en.ts
Outdated
@@ -592,8 +592,7 @@ export default { | |||
genericDeleteFailureMessage: 'Unexpected error deleting the money request, please try again later', | |||
genericEditFailureMessage: 'Unexpected error editing the money request, please try again later', | |||
genericSmartscanFailureMessage: 'Transaction is missing fields', | |||
duplicateWaypointsErrorMessage: 'Please remove duplicate waypoints', | |||
emptyWaypointsErrorMessage: 'Please enter at least two waypoints', | |||
atLeastTwoDifferentWaypoints: 'Please enter at least two different waypoints', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
en: Please enter at least two different addresses.
src/languages/es.ts
Outdated
@@ -586,8 +586,7 @@ export default { | |||
genericDeleteFailureMessage: 'Error inesperado eliminando la solicitud de dinero. Por favor, inténtalo más tarde', | |||
genericEditFailureMessage: 'Error inesperado al guardar la solicitud de dinero. Por favor, inténtalo más tarde', | |||
genericSmartscanFailureMessage: 'La transacción tiene campos vacíos', | |||
duplicateWaypointsErrorMessage: 'Por favor elimina los puntos de ruta duplicados', | |||
emptyWaypointsErrorMessage: 'Por favor introduce al menos dos puntos de ruta', | |||
atLeastTwoDifferentWaypoints: 'Por favor introduce al menos dos puntos de ruta diferentes', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
es: Por favor introduce al menos dos direcciones diferentes.
@ntdiary I updated. |
Just finished the checklist, if the reviewer check job can be run again, it should pass. : ) |
All right, it's passing now. @ntdiary did you want to approve the PR? It sounds like you approve, but there isn't an officially approved review, so I wanted to check. |
@tgolen, ah, yeah, I have approved it already, I think we can merge it now. (not sure why it didn't show up, might be related to the change request above not being manually marked as resolved?) |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/tgolen in version: 1.3.96-6 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.96-15 🚀
|
🚀 Deployed to staging by https://github.com/tgolen in version: 1.3.98-0 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.98-5 🚀
|
Details
Fix error message for duplicate waypoint
Fixed Issues
$ #29803
PROPOSAL: #29803 (comment)
Tests
Please enter at least two waypoints
appearsPlease enter at least two waypoints
appearsOffline tests
Same as above
QA Steps
Please enter at least two waypoints
appearsPlease enter at least two waypoints
appearsPR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2023-10-28.at.16.01.22.mov
Android: mWeb Chrome
Screen.Recording.2023-10-28.at.15.56.33.mov
iOS: Native
Screen.Recording.2023-10-28.at.16.03.16.mov
iOS: mWeb Safari
Screen.Recording.2023-10-28.at.15.54.10.mov
MacOS: Chrome / Safari
Screen.Recording.2023-10-28.at.16.17.13.mov
MacOS: Desktop
Screen.Recording.2023-10-28.at.16.15.39.mov